package com.ktjiaoyu.server.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ktjiaoyu.server.mapper.EmployeeMapper;
import com.ktjiaoyu.server.pojo.Employee;
import com.ktjiaoyu.server.service.IEmployeeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jjx
 * @since 2024-07-10
 */
@Service
public class EmployeeServiceImpl extends ServiceImpl<EmployeeMapper, Employee> implements IEmployeeService {
    @Resource
    private EmployeeMapper employeeMapper;

    // 分页显示员工基本资料列表, 并按员工名模糊查询及政治面貌、部门、入职时间查询
    @Override
    public IPage<Employee> selectByPage(Page<Employee> page, String query, String sort, Integer politicsId, Integer deptId, String beginTime, String endTime) {
        return employeeMapper.selectByPage(page,query,sort, politicsId, deptId, beginTime, endTime);

    }

}
